package app.auto.runner.base.frame;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;

import app.auto.AndroidInstance;
import app.auto.runner.base.intf.FunCallback;

public class IntentUtil extends AndroidInstance {
    public void recvShare(FunCallback funCallback) {
        Intent intent = ((Activity) getContext()).getIntent();
        String type = intent.getType();//类型

        if (type != null /*&& "video/mp4".equals(type)*/) {
            String uri = intent.getScheme();
            Bundle b = intent.getExtras();
            String txt = (String) b.get(b.keySet().iterator().next());

            funCallback.onCallback(txt, null);
        }
    }

    @Override
    public AndroidInstance use(Object mp, Object... p) {
        return null;
    }
}
